﻿CREATE VIEW [dbo].[ETL_V_DtTableColumn]
	AS 
	SELECT DTC.*,
		DSC.Name as MappingColumnName,
		DSC.DataType as MappingColumnType,
		DSC.Id as MappingColumnId
	FROM ETL_DtTableColumn as DTC
		LEFT join ETL_DtSourceColumnMapping as DSCM on DSCM.DtTableColumnId = DTC.Id
		LEFT join ETL_DtSourceColumn as DSC on DSC.Id = DSCM.DtSourceColumnId